<template>
  <div class="content">
    <!-- 提现成功回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 1">
      <van-nav-bar
        @click-left="$router.back()"
        left-arrow
        title="提现成功"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/tixianchenggong.png" alt="" />
        </div>
        <span>恭喜你！提现成功</span>
        <br />
        <span>提现金额将在24小时内到账</span>
        <div class="btn" @click="$router.go(-1)">返回</div>
      </div>
    </div>
    <!-- 提现失败回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 2">
      <van-nav-bar
        @click-left="$router.back()"
        left-arrow
        title="提现失败"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/tixianshibai.png" alt="" />
        </div>
        <span>抱歉，提现失败</span>
        <br />
        <div class="btn" @click="$router.go(-1)">返回</div>
      </div>
    </div>

    <!-- 充值成功回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 3">
      <van-nav-bar
        @click-left="goBack"
        left-arrow
        title="充值成功"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/tixianchenggong.png" alt="" />
        </div>
        <span>恭喜你！充值成功</span>
        <br />
        <div class="btn" @click="goBack">返回</div>
      </div>
    </div>
    <!-- 充值失败回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 4">
      <van-nav-bar
        @click-left="$router.back()"
        left-arrow
        title="充值失败"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/tixianshibai.png" alt="" />
        </div>
        <span>抱歉，充值失败</span>
        <br />
        <div class="btn" @click="$router.go(-1)">返回</div>
      </div>
    </div>

    <!-- 认证成功回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 5">
      <van-nav-bar
        @click-left="goBack"
        left-arrow
        title="认证成功"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/shimingrenzheng.png" alt="" />
        </div>
        <span>恭喜你，认证成功</span>
        <br />
        <div class="btn" @click="$router.replace('/personal')">返回</div>
      </div>
    </div>
    <!-- 认证失败回显 -->
    <div class="tixiansuccess" v-if="$route.query.msg == 6">
      <van-nav-bar
        @click-left="goBack"
        left-arrow
        title="认证失败"
        fixed
      ></van-nav-bar>
      <div class="mains">
        <div class="imgs">
          <img src="../../assets/images/wallet/tixianshibai.png" alt="" />
        </div>
        <span>抱歉，认证失败</span>
        <br />
        <div class="btn" @click="$router.replace('/personal')">返回</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isTixianSuccess: "", //是否是提现成功
      ischongzhiSuccess: "", //是否是充值成功
      isRenzhengSuccess: "", //是否是认证成功
    };
  },
  created() {
    document.querySelector("html").style.backgroundColor = "#f3f5f7";
    document.querySelector("body").style.backgroundColor = "#f3f5f7";
  },
  methods: {
    goBack() {
      if (this.$route.query.from) {
        return this.$router.replace("/" + this.$route.query.from);
      }
      if (this.$route.query.msg == 5 || this.$route.query.msg == 6) {
        return this.$router.replace("/personal");
      }
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="less" scoped>
.tixiansuccess {
  .btn {
    width: 80%;
    height: 40px;
    opacity: 1;
    background: #4b5fe0;
    border-radius: 41px;
    text-align: center;
    line-height: 40px;
    color: #ffffff;
    margin: 0 auto;
    margin-top: 250px;
  }
  .mains {
    padding-top: 150px;
    text-align: center;
    line-height: 30px;
    .imgs {
      width: 110px;
      height: 110px;
      border-radius: 6em;
      margin: 0 auto;
    }
  }
}
</style>